package cn.skyclass.beans
{
	import mx.collections.ArrayCollection;
	
	/**
	 * 包含文件信息的树节点信息，主要实现 ITreeNode 接口，
	 * 表示文件叶子节点，不可以有子节点
	 */
	[Bindable]
	public class TreeNodeFileBean extends BaseFileBean implements ITreeNode
	{
		// # implementing ITreeNode
	
		public function getIconOpen():Class{
			return null;
		}	
			
		public function getIconClose():Class{
			return null;
		}
		
		// parent property
		private var _parent:ITreeNode;
		[Transient]
		public function get parent():ITreeNode{
			return this._parent;
		}	
		public function set parent(value:ITreeNode):void{
			this._parent = value;
		}
			
		// children property
		[Transient]
		public function get children():ArrayCollection{
			return null;
		}				
		
		// expanded property
		private var _expanded:Boolean;
		[Transient]
		public function get expanded():Boolean{
			return this._expanded;
		}	
		public function set expanded(value:Boolean):void{
			this._expanded = value;
		}
		
		public function addChild(child:ITreeNode):Boolean{
			return false;
		}
		
		public function removeChild(child:ITreeNode):Boolean{
			return false;
		}

		public function sortChildren():void{	
			// no children to sort
		}	
		
		// # ITreeNode end	
		
			
		override public function get label():String{
			return this.name;
		}		
	}
}